﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using DTO;
using BUS;

namespace GUI
{
    public partial class login : Form
    {
        public login()
        {
            InitializeComponent();
        }
        private string sConnectionString;
        private void btnlogin_Click(object sender, EventArgs e)
        {
            sConnectionString = "Initial Catalog=" + txt_database.Text + "; ";
            sConnectionString += "Data Source=" + txt_server.Text + "; ";
            sConnectionString += "Integrated Security = SSPI" + "; ";
            Connected.Conecter(sConnectionString);
           
            DangNhap dangNhapfrm = new DangNhap();
            dangNhapfrm.ShowDialog();
            this.Dispose();
        }

        private void btnthoat_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
